package com.bit.strongbaby;

import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView.OnEditorActionListener;

public class TabOne extends Fragment{
    public static View view;
    MenuActivity day = new MenuActivity();
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
 
    }
 
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                    Bundle savedInstanceState)
    {
    		
    		view = inflater.inflate(R.layout.one, container, false);
    		final Button btn1 = (Button)view.findViewById(R.id.btn111);
    		
			if(day.day < 30 && day.day > 0){
			view.setBackgroundResource(R.drawable.dbfirstmonth);
			}else if(day.day < 60 && day.day > 30){	
			view.setBackgroundResource(R.drawable.dbtwomonth);
			}else if(day.day < 90 && day.day > 60){
			view.setBackgroundResource(R.drawable.dbthirdmonth);		
			}
    		
			btn1.setOnClickListener(new OnClickListener() {
				public void onClick(View v) {
					if(day.day < 30 && day.day > 0){
					Intent intent = new Intent(getActivity(), Growsub1_1Activity.class);
					startActivity(intent);	
					}else if(day.day < 60 && day.day > 30){
					Intent intent = new Intent(getActivity(), GyroActivity.class);
					startActivity(intent);	
					}else if(day.day < 90 && day.day > 60){
					Intent intent = new Intent(getActivity(), Growsub3_1Activity.class);
					startActivity(intent);	
					}
				}
			});
            return view;
    } 
 
}
